package com.itheima.order.feign;
import com.itheima.order.pojo.Order;
import com.itheima.util.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/****
 * @Author:itheima
 * @Description:
 *****/
@FeignClient(name="order")
public interface OrderFeign {

    /***
     * 多条件搜索品牌数据
     * @param order
     * @return
     */
    @PostMapping(value = "/order/search")
    Result<List<Order>> findList(@RequestBody(required = false) Order order);

    /**
     * 根据id查询order
     * @param id
     * @return
     */
    @GetMapping("/order/{id}")
    Result<Order> findById(@PathVariable("id") String id);

    /**
     * 修改Order数据
     * @param order
     * @param id
     * @return
     */
    @PutMapping(value="/order/{id}")
    Result update(@RequestBody Order order,@PathVariable("id") String id);


}